'''
filename: smsg
author: yinwenlu
datetime: 2019/8/27 18:49
software: PyCharm
'''
import requests
class SendMsg():
    account=''
    type=1
    msg=''
    url=''
    def __init__(self,account,type,msg,url):
        self.account=account
        self.type=type
        self.msg=msg
        self.url="https://data.erhuuotuzi.cn/"+url
    def httpPost(self):
        params = {
            "account": self.account,
            "type": self.type,
            "msg":self.msg
        }
        resp = requests.session().post(url=self.url,data=params)
        return True if resp.status_code==200 else False


